﻿using Common.Utils;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common.Utils
{
    public static class IOCHelp
    {
        private static ImportDefinitionHelp m_ImportDefinitionHelp;

        private static string m_Version= "1.0.0.0";

        static IOCHelp()
        {
            m_ImportDefinitionHelp = ImportDefinitionHelp.Instance;
            m_ImportDefinitionHelp.Init("./ImportModulePath");
            //m_Version  = ConfigurationManager.AppSettings["ModbusVersion"];
        }

        public static T GetT<T>() where T : class
        {
          return  m_ImportDefinitionHelp.GetT<T>(m_Version);
        }

        public static T GetT<T>(string guid) where T : class
        {
            return m_ImportDefinitionHelp.GetT<T>(m_Version,guid);
        }
    }
}
